package com.han.controller;



import com.han.remote.Service2Client;
import com.han.service.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(path = "/hello")
public class HelloController {

    @Resource
    private HelloService helloService;

    @Resource
    private Service2Client service2Client;


    @RequestMapping(method = RequestMethod.GET, path = "/sy")
    public void sy(){
        // 1.根据服务名称，拉取服务的实例列表
        System.out.println(service2Client.getHi());
        helloService.sayHi();
    }
}
